<?php
namespace Traits;

trait SerializeAttribute
{
    /* 时间类型转换 */
    protected function serializeDate(\DateTimeInterface $date): string
    {
        return $date->format('Y-m-d H:i:s');
    }
}
